/**
 * @Author: DengJia
 * @Date: 2021/10/8 17:06
 * @Description:
 */

public class Test {
    public static void main(String[] args) {
        MessageService messageService = new MessageService();
        VipUser vu1 = new VipUser("1","张");
        VipUser vu2 = new VipUser("2","王");
        VipUser vu3 = new VipUser("3","李");

        /* 都进行订阅 */
        messageService.addSub(vu1);
        messageService.addSub(vu2);
        messageService.addSub(vu3);

        messageService.push("所有的粉丝都会收到这一条消息！！！");
    }
}
